package com.jic.veteran.service.impl;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.jic.veteran.common.exception.ApiException;
import com.jic.veteran.component.VeteranSecurityContext;
import com.jic.veteran.dao.AlumniExplainAdminMapper;
import com.jic.veteran.dao.CmsArticleInfoDao;
import com.jic.veteran.dto.AlumniExplainParam;
import com.jic.veteran.dto.CmsArticleShowCountDto;
import com.jic.veteran.mapper.CmsArticleInfoMapper;
import com.jic.veteran.model.CmsArticleInfo;
import com.jic.veteran.service.AlumniExplainService;
import com.jic.veteran.service.UmsAdminCacheService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * 文章管理Service实现类
 * Created by mars on 2021/11/23.
 */
@Slf4j
@Service
public class AlumniExplainServiceImpl implements AlumniExplainService {

    @Autowired
    private AlumniExplainAdminMapper alumniExplainAdminMapper;



    /**
     * by mars
     * @param alumniExplainParam 首页介绍信息修改
     * @return
     */
    public int insertExplain(AlumniExplainParam alumniExplainParam) {
        System.out.println(VeteranSecurityContext.getUserName());
        System.out.println(DateUtil.date());
        return alumniExplainAdminMapper.insertExplain(alumniExplainParam.getExplainContent(),
                alumniExplainParam.getType(),
                VeteranSecurityContext.getUserName(),
                DateUtil.date());
    }


}
